<?php
/* Description: This file is used to add main category. */
#########IncludeFiles####################################################################################
include_once '../inc/config.php';
include_once("../inc/bootstrape.php");
require_once _SITE_PATH_.'classes/Venue/Venue.php';
require_once _SITE_PATH_.'classes/CommonUtility/CommonUtility.php';

$id = trim($_REQUEST['id']); 
if( $_POST['submit']=='Submit'){    
	$parms['id'] = $_POST['id'];
    $parms['rating'] = $_POST['rating'];
	$parms['description'] = $_POST['description'];
	$parms['added'] = date("Y-m-d h:i:s");
	       
    $condition = array(); 
	$condition['id'] = $parms['id'];
	if( CommonUtility::updateData($parms, 'venue_rating_master', $condition)) {           
        header("Location: venuerating_mng.php?msg=1316");            
        exit;
    }
    $err = 1317;    
}

$venueratings = array();
$venueratings = Venue::getVenueRatings($id);
$result = $venueratings[0];
	
$errMsg = $err;
$_tplName = 'venue/venuerating_edit.tpl';
$_title = 'Edit Venue Rating';

require_once _ADMIN_TPL_MAIN_;
?>